Skip to content

Migrate validate-source, build-each-commit, swagger-check, cross (alt) from cirrus to gha#9

Draft
kolyshkin wants to merge 5 commits into
podman-container-tools:mainfrom
kolyshkin:migrate-validate-source-to-gha
Draft

Migrate validate-source, build-each-commit, swagger-check, cross (alt) from cirrus to gha#9
kolyshkin wants to merge 5 commits into
podman-container-tools:mainfrom
kolyshkin:migrate-validate-source-to-gha

Conversation

@kolyshkin
Copy link
Copy Markdown
Contributor

@kolyshkin kolyshkin commented May 26, 2026

This is a rework of podman-container-tools/podman#28740, taking into accounts the review comments received.

Rebased on top of #8.

  1. Move Cirrus validate-source_task to GHA
  2. Move Cirrus 'build each commit' to GHA
  3. Move Cirrus swagger_task to GHA
  4. Move alt-build (as cross-build) to GHA

See individual commits for details.

Does this PR introduce a user-facing change?

NONE

@kolyshkin kolyshkin force-pushed the migrate-validate-source-to-gha branch 5 times, most recently from 0084f36 to cb33631 Compare May 26, 2026 20:54
@kolyshkin kolyshkin changed the title Migrate validate-source from cirrus to gha Migrate validate-source, build-each-commit, swagger-check from cirrus to gha May 27, 2026
@kolyshkin kolyshkin force-pushed the migrate-validate-source-to-gha branch from ecbd59d to 137743d Compare May 27, 2026 02:56
@kolyshkin kolyshkin mentioned this pull request May 27, 2026
@kolyshkin kolyshkin force-pushed the migrate-validate-source-to-gha branch 5 times, most recently from 19878e2 to f68fc79 Compare May 27, 2026 09:02
@kolyshkin
Copy link
Copy Markdown
Contributor Author

OK, make-and-check-size fails because of a chicken-and-egg problem: it resets the git and uses the old copy of itself (which is not even present since I moved it). Working around it by making an extra copy.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkin kolyshkin force-pushed the migrate-validate-source-to-gha branch from f68fc79 to 73d1f69 Compare May 27, 2026 21:52
kolyshkin and others added 4 commits May 27, 2026 16:05
Move the Cirrus validate-source_task to a GitHub Actions workflow
(.github/workflows/ci.yml) running as a single job on the CNCF-hosted
runner. The job runs the same stages: make validate-source,
tests-included, and the conditional renovate config check.

golangci-lint for FreeBSD and macOS now runs cross-compiled (GOOS) on
the native Linux runner instead of on dedicated Cirrus VMs/workers, so
the lint steps are dropped from osx_alt_build and freebsd_alt_build.

The PR helper scripts are de-Cirrus'd: they read CI-neutral env vars
(PR_HEAD, PR_NUMBER, PR_BODY) and the "No New Tests" label override is
now handled natively in the workflow instead of via a GraphQL query.

The shared clone/setup/main YAML anchors are relocated into build_task,
and the dead _run_validate-source runner.sh function is removed.

The tests-of-tests (.t files) are fixed for new setup (mostly removing
test cases which are now obsoleted, like [CI:DOCS] and [NO NEW TESTS]
markers. NOTE we still don't run tests in CI (although we could), but
I ran them locally and fixed all the issues.

Finally, test-jira-links-included is removed as it is RHEL-branch
specific and have no place in the new repo.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Add a 'Build each commit' step to the validate-source job. It builds the
PR fork point to record baseline binary sizes, then rebuilds and size-checks
each commit via 'git rebase -x', confirming every commit compiles on its own
and that no binary grows beyond the enforced limit.

Move hack/make-and-check-size to hack/ci/make-and-check-size.sh and replace
its Cirrus-specific GitHub GraphQL label query with a BLOAT_APPROVED env var
that the workflow derives from the 'bloat_approved' PR label.

Drop the now-migrated 'Build Each Commit' matrix entry from .cirrus.yml and
the corresponding *Each* case from hack/ci/runner.sh.

NOTE due to chicken-and-egg problem with make-and-check-size we need to
make a copy of it before working with git.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Add 'make cross' step, which builds linux and freebsd binaries for
various architectures, to ensure nothing is broken. Remove the
now-redundant part from .cirrus.yml and hack/ci/runner.sh.

Add 'make swagger' step, which builds pkg/api/swagger.yaml via the
go-swagger tool as part of source validation, confirming the API spec
generates cleanly. This mirrors the generation half of the Cirrus
swagger_task. Don't remove the cirrus task yet as it also uploads the
generated swagger.yaml.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Add a 'Publish swagger' workflow that builds pkg/api/swagger.yaml and
uploads it to the libpod-master-releases GCS bucket (swagger-latest.yaml
for main, swagger-<tag>.yaml for tags), reusing the same gcsupld container
as Cirrus with GCPJSON/GCPNAME supplied via repository secrets. Per-PR
uploads to libpod-pr-releases are dropped, as nothing consumes them.

The gcsupld image tag is hardcoded (copied from .cirrus.yml IMAGE_SUFFIX)
rather than read at runtime, since Cirrus CI is to be decommissioned soon.

Remove the now-migrated swagger_task from .cirrus.yml (and its success_task
dependency) and the _run_swagger handler from hack/ci/runner.sh, and update
docs/README.md to point at the new workflow. While at it, fix the link in
docs/README.md to hack/ci/README.md#docs-task, which had been dangling ever
since that file was removed in 2020 by commit 2c9084e.

Note: requires GCPJSON and GCPNAME to be configured as GitHub repository
secrets before the upload step can succeed.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkin kolyshkin force-pushed the migrate-validate-source-to-gha branch from 73d1f69 to a93f13c Compare May 27, 2026 23:25
@kolyshkin kolyshkin changed the title Migrate validate-source, build-each-commit, swagger-check from cirrus to gha Migrate validate-source, build-each-commit, swagger-check, cross (alt) from cirrus to gha May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant